export interface ITotpInfo {
  length(): number;
  toString(): string;
}



class Totp implements ITotpInfo {
  appName: string;
  userName: string;
  secretKey: string;

  constructor(appName:string = "defaultApp", userName: string = "defaultUser", secretKey: string = "defaultSecretKey") {
    this.appName = appName;
    this.userName = userName;
    this.secretKey = secretKey;
  }

  length() : number {
    return 1;
  }

  toString(): string {
    return this.appName + ":" + this.userName + ":" + this.secretKey;
  }
}

export function createTotp() : ITotpInfo{
  return new Totp();
}
